﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Client.Sys
{
    public interface IModule
    {
        List<ModuleInfo> GetModule(object UserId);
        List<ViewInfo> GetViews(ModuleInfo module);
        List<MenuInfo> GetListOfMenuInModuleByUser(ModuleInfo Module, string GroupName, object UserId);
        void SaveListOfMenuInModuleForUser(object UserId, string GroupKey, IList<MenuInfo> list);
        void InstallModule();
    }
    public class ModuleInfo
    {
        public string Module { get; set; }
        public string Path { get; set; }
        public int ModuleID { get; set; }
        //public bool IsPublic { get; set; }
        public List<GroupInfo> Groups { get; set; }
        public MenuInfo HomeMenu { get; set; }
        public string Caption { get; set; }
    }
    public class ViewInfo
    {
        public string Name { get; set; }
        public string Path { get; set; }
        public string Image { get; set; }
        //public string Plugin { get; set; }
    }
    public class GroupInfo
    {
        public string GroupName { get; set; }
        public string Caption { get; set; }
        public List<MenuInfo> Menus { get; set; }
    }
    public class MenuInfo
    {
        public string Caption { get; set; }
        public string Path { get; set; }
        public string Image { get; set; }
        //public int Ord { get; set; }
       // public string PluginType { get; set; }
        //public bool IsImport { get; set; }
       // public string ModuleName { get; set; }
        //public string ResourceKey { get; set; }
    }
}
